import service from "@/utils/request";
import type { Response, PageResponse } from "@/types/common";
import type { WalletPageItem } from "@/types/pos/wallet/index";
export const usePosWalletPageApi = (params: object) => {
  return service<any, Response<PageResponse<WalletPageItem>>>({
    url: `/v1/pos/wallet/page`,
    method: "GET",
    params,
  });
};

export const usePosWalletQueryApi = (params: object) => {
  return service<any, Response<WalletPageItem>>({
    url: `/v1/pos/wallet/query`,
    method: "GET",
    params,
  });
};

export const usePosWalletCreateApi = (data: object) => {
  return service({
    url: `/v1/pos/wallet/create`,
    method: "POST",
    data,
  });
};

export const usePosWalletUpdateApi = (data: object) => {
  return service({
    url: `/v1/pos/wallet/update`,
    method: "POST",
    data,
  });
};

export const usePosWalletDeleteApi = (data: object) => {
  return service({
    url: `/v1/pos/wallet/delete`,
    method: "DELETE",
    data,
  });
};

export const usePosWalletChargeApi = (data: object) => {
  return service({
    url: `/v1/pos/wallet/charge`,
    method: "POST",
    data,
  });
};
